
package com.faner.fast.security.exception;

import com.faner.fast.security.component.FastAuth2ExceptionSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
/**
 * 自定义OAuth2Exception
 * @作者 faner
 * @创建时间 2021/1/15 18:02
 */
@JsonSerialize(using = FastAuth2ExceptionSerializer.class)
public class FastAuth2Exception extends OAuth2Exception {

    @Getter
    private String errorCode;

    public FastAuth2Exception(String msg) {
        super(msg);
    }

    public FastAuth2Exception(String msg, String errorCode) {
        super(msg);
        this.errorCode = errorCode;
    }

}

